<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');
	
	class Email extends CI_Controller {
		
		public function __construct()
		{
			parent:: __construct();
		}
		
		public function send_mail() {
		$config = Array(
    'protocol' => 'smtp',
    'smtp_host' => 'smtp.googlemail.com',
    'smtp_port' => 465,
    'smtp_user' => 'xxx',
    'smtp_pass' => 'xxx',
    'mailtype'  => 'html', 
    'charset'   => 'iso-8859-1',
	'protocol' => 'mail',
        'wordwrap' => 'FALSE',
     'mailtype' => 'html'
);
$this->load->library('email', $config);

$this->email->set_newline("\r\n");
			 
		$this->email->from('maranskie1989@gmail.com', 'Your Name');
		$this->email->to('maranskie1989@gmail.com'); 
		 

		$this->email->subject('Email Test');
		$this->email->message('Testing the email class.');	

		$this->email->send();

		echo $this->email->print_debugger();

    }
		}
	 
?>
